package com.ljf.authority.dto.command;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.ljf.common.validation.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 菜单列表定义--修改明细  authority_base_menu_tabulation
 *
 * @author LJF
 * @since 2025-05-22
 */
@Data
@ApiModel("菜单列表定义--修改明细")
public class AuthorityBaseMenuTabulationDetailCommand implements Serializable {

    @JsonProperty("id")
    @ApiModelProperty(value = "ID")
    @NotNull(message = "ID不能为空", groups = {UpdateGroup.class})
    private Long id;

    @JsonProperty("picCode")
    @ApiModelProperty(value = "图片编码")
    @Length(message = "图片编码不能超过50个字符", max = 50)
    private String picCode;

    @JsonProperty("componentUrl")
    @ApiModelProperty(value = "组件URL地址")
    @Length(message = "组件URL地址不能超过50个字符", max = 50)
    private String componentUrl;

    @JsonProperty("clickFunction")
    @ApiModelProperty(value = "点击方法")
    @Length(message = "点击方法不能超过30个字符", max = 30)
    private String clickFunction;

    @JsonProperty("width")
    @ApiModelProperty(value = "宽度(px)")
    @Min(message = "宽度不能小于0", value = 0)
    private Integer width;

}
